/**
 * 数据字典
 **/


const SERVER_NAME_AUTH = "/vaie-cloud-auth"
const URL_PREFIX_SYSTEM = SERVER_NAME_AUTH + "/system"

const businessIssue142DbB = [
    {label: "选项1", value: '01', disabled: false},
    {label: "选项2", value: "02", disabled: false},
    {label: "选项3", value: "03", disabled: true},
    {label: "选项4", value: "04", disabled: false},
    {label: "选项5", value: "05", disabled: false}
]

const conditionData = [
    {label: "等于", value: '=', disabled: false},
    {label: "不等于", value: "<>", disabled: false},
    {label: "大于", value: ">", disabled: false},
    {label: "大于等于", value: ">=", disabled: false},
    {label: "小于", value: "<", disabled: true},
    {label: "小于等于", value: "<=", disabled: true},
]
export default ({requestForMock, tools, mock}) => ({

    DIC_SEARCHING(params = {}) {
        const url = URL_PREFIX_SYSTEM + '/dict'
        // 模拟数据
        mock
            .onAny(url)
            .reply(...tools.responseSuccess(
                // .reply(...tools.responseError(
                {list: params == 'condition' ? conditionData : businessIssue142DbB}
            ))
        // 接口请求
        return requestForMock({
            url: url,
            method: 'get',
            params
        })
    }


})